home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5560 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: news.eclipse.net!usenet
  2. From: steve@eclipse.net (Steve Teale)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: C++ and dynamic loading of libraries
  5. Date: Mon, 05 Feb 1996 17:26:28 GMT
  6. Message-ID: <4f5em4$26u@lunar.eclipse.net>
  7. References: <4et0d8$dlc@news1.usa.pipeline.com>
  8. NNTP-Posting-Host: ne_36.eclipse.net
  9. X-Newsreader: Forte Free Agent 1.0.82
  10.  
  11. grantp@usa.pipeline.com(Pete) wrote:
  12.  
  13. >On Feb 01, 1996 09:06:31 in article <C++ and dynamic loading of libraries>,
  14. >'u19809@kb.be (Wim Delvaux)' wrote: 
  15. >>I would like to be able to load libraries generated from C++ from 
  16. >>other C++ code.  This is not a big problem but I would like to use the 
  17. >>libraries ON DEMAND ie. when the application needs it and not at 
  18. >>compile time. (Using LOADLIBRARY/FINDSYMBOL api calls of the dynamic 
  19. >>loader components of several OS-ses : Windows, Linux, Unix, ...) 
  20. >> 
  21. >>There is however the problem of the name mangling : What is the name 
  22. >>of the C++ function I need ?   
  23. >> 
  24. >>Does there exist (compiler-specific) API's to mangle/demangle that can 
  25. >>be used from within an application ? 
  26. >>Does anybody have other suggestions how to do this ? 
  27. >> 
  28. >Read up on extern "C" declaration.  It's covered in the 
  29. >FAQ as well as your compiler documentation.  But that  
  30. >only suppresses C++ name mangling -- it doesn't have 
  31. >anything to do with wether or not the library is static 
  32. >or dynamic.  If your library calls work OK when the lib 
  33. >is statically linked, they should work OK when using 
  34. >dynamic linking also. 
  35. >-- 
  36. >Pete Grant 
  37. >Kalevi, Inc. 
  38. >Object Oriented Software Development
  39.  
  40. Alternatively, use IMPLIB or equivalent to build a stub library for
  41. the DLL, and look at the names in the library listing.
  42.  
  43.  
  44.  
  45.